<%-- 
    Document   : listar
    Created on : 22/11/2009, 12:03:48 AM
    Author     : Freddy
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%
        request.setAttribute("nombrePagina", "Plantilla");
%>
<f:view>
    <%@include file="/WEB-INF/jspf/header.jspf" %>

    

    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Gesti&oacute;n de Tasadores</title>
        </head>
        <body>
            <h1>Gesti&oacute;n de Tasadores</h1>
            <h2>Lista de Tasadores</h2>
            <h:messages id="messages" styleClass="messages_content" layout="table" errorClass="error" warnClass="warn" infoClass="info"/>
            <h:form>
                <h:panelGrid columns="5">
                    <h:commandButton id="btnVolver" value="Volver" action="volver"/>
                    <h:commandButton id="btnNuevo" value="Nuevo" action="#{TasadorController.nuevoTasador}"/>
                    <h:inputText id="txtBuscarNombre" />
                    <h:commandButton id="btnBuscar" value="Buscar" action="buscar"/>
                </h:panelGrid>
                <fieldset>
                    <legend>Lista de Tasadores</legend>
                    <h:panelGrid columns="1">
                        <h:outputText value="Seleccione un tasador:" />                        
                        <t:dataTable id="tblGarantias" value="#{TasadorController.tasadores}"
                                     var="item" rowClasses="TableRow1,TableRow2" columnClasses="TableColumn"
                                     bgcolor="#F1F1F1" border="10" cellpadding="5"
                                     cellspacing="3" first="0"
                                     frame="hsides" rules="all" rows="7"
                                     styleClass="TableClass" headerClass="TableHeader" footerClass="TableFooter">                            
                            <h:column>
                                <f:facet name="header"><h:outputText value="Nombre"/></f:facet>
                                <h:outputText value="#{item.nombrePersona} #{item.apePaternoPersona} #{item.apeMaternoPersona}" />
                            </h:column>
                            
                            <h:column>
                                <f:facet name="header"><h:outputText value="DNI"/></f:facet>
                                <h:outputText value="#{item.dniPersona}" />
                            </h:column>
                            <h:column>
                                <f:facet name="header"><h:outputText value="Sexo"/></f:facet>
                                <h:outputText value="#{item.sexPersona}" />
                            </h:column>
                            <h:column>
                                <h:commandLink id="btnSeleccionar"
                                   action="seleccionar"
                                   value="Seleccionar" >
                                    <f:setPropertyActionListener target="#{GarantiaController.garantiaHipotecaria.tipotasador}" value="#{item}" />
                                </h:commandLink>
                            </h:column>
                            <h:column>
                                <h:commandLink id="btnEliminar"
                                   action="#{TasadorController.eliminarTasador}"
                                   value="Eliminar" >
                                    <f:setPropertyActionListener target="#{TasadorController.empleado}" value="#{item}" />
                                </h:commandLink>
                            </h:column>
                        </t:dataTable>
                        <t:dataScroller id="scroll_1"
                                    for="tblGarantias"
                                    fastStep="5"
                                    pageCountVar="pageCount"
                                    pageIndexVar="pageIndex"
                                    styleClass="scroller"
                                    paginator="true"
                                    paginatorMaxPages="8"
                                    paginatorTableClass="paginator"
                                    paginatorActiveColumnStyle="font-weight:bold;"
                                    immediate="true">
                            <f:facet name="first" >
                                <t:graphicImage url="/flechas/arrow-first.gif" border="1"/>

                            </f:facet>
                            <f:facet name="last">
                                <t:graphicImage url="/flechas/arrow-last.gif" border="1"/>
                            </f:facet>
                            <f:facet name="previous">
                                <t:graphicImage url="/flechas/arrow-previous.gif" border="1" />
                                <h:outputText value="Ant." style="" />
                            </f:facet>
                            <f:facet name="next">
                                <t:graphicImage url="/flechas/arrow-next.gif" border="1" />
                                <h:outputText value="Sig." style="" />
                            </f:facet>
                        </t:dataScroller>
                    </h:panelGrid>
                 </fieldset>
             </h:form>
        </body>
    </html>
    <%@include file="/WEB-INF/jspf/footer.jspf" %>
</f:view>
